package com.xgxf.server.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xgxf.server.common.JsonResult;
import com.xgxf.server.mapper.UserOperationLogMapper;
import com.xgxf.server.pojo.UserOperationLog;
import com.xgxf.server.pojo.UserOperationLogQuery;
import com.xgxf.server.service.IUserOperationLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * ClassName: UserOperationLogServiceImpl
 * Package: com.xgxf.server.service.impl
 *
 * @Description:
 * @Author: Anonymity
 * @CreateDate: 2024.03.07 - 11:16
 * Version: v1.0
 */
@Service
public class UserOperationLogServiceImpl implements IUserOperationLogService {

    @Autowired
    UserOperationLogMapper userOperationLogMapper;

    @Override
    public JsonResult getUserOperationLogList(UserOperationLogQuery userOperationLogQuery) {

        IPage<UserOperationLog> iPage = new Page<>(userOperationLogQuery.getPage(),userOperationLogQuery.getLimit());
        IPage<UserOperationLog> pageData = userOperationLogMapper.getList(iPage, userOperationLogQuery);

        return JsonResult.success(pageData,"列表获取成功！");
    }
}
